package com.huangliusong.desigin.pattern.structual.proxy.dynamicproxy;

import com.huangliusong.desigin.pattern.structual.proxy.IOrderService;
import com.huangliusong.desigin.pattern.structual.proxy.Order;
import com.huangliusong.desigin.pattern.structual.proxy.OrderServiceImpl;

/**
 * @author huangliusong
 * @since 2018/10/13
 * {@link }
 */
public class Test {
    public static void main(String[] args) {
        Order order=new Order();
        order.setUserId(2);

        IOrderService iOrderService= (IOrderService) new OrderServiceDynamicProxy(new OrderServiceImpl()).bind();
        iOrderService.saveOrder(order);
    }
}
